diff --git a/system/core/Common.php b/system/core/Common.php
index ae14746..47293a1 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -16,6 +16,20 @@
 // ------------------------------------------------------------------------
 
 /**
+ * Common Functions
+ *
+ * Loads the base classes and executes the request.
+ *
+ * @package		CodeIgniter
+ * @subpackage	codeigniter
+ * @category	Common Functions
+ * @author		ExpressionEngine Dev Team
+ * @link		http://codeigniter.com/user_guide/
+ */
+
+// ------------------------------------------------------------------------
+
+/**
 * Determines if the current version of PHP is greater then the supplied value
 *
 * Since there are a few places where we conditionally test for PHP > 5
@@ -23,20 +37,20 @@
 *
 * @access	public
 * @param	string
-* @return	bool
+* @return	bool	TRUE if the current version is $version or higher
 */
-function is_php($version = '5.0.0')
-{
-	static $_is_php;
-	$version = (string)$version;
-	
-	if ( ! isset($_is_php[$version]))
+	function is_php($version = '5.0.0')
 	{
-		$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
-	}
+		static $_is_php;
+		$version = (string)$version;
+	
+		if ( ! isset($_is_php[$version]))
+		{
+			$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
+		}
 
-	return $_is_php[$version];
-}
+		return $_is_php[$version];
+	}
 
 // ------------------------------------------------------------------------
 
@@ -45,43 +59,43 @@
  *
  * is_writable() returns TRUE on Windows servers when you really can't write to 
  * the file, based on the read-only attribute.  is_writable() is also unreliable
- * on Unix servers if safe_mode is on. 
+ * on Unix servers if safe_mode is on.
  *
  * @access	private
  * @return	void
- */
-function is_really_writable($file)
-{	
-	// If we're on a Unix server with safe_mode off we call is_writable
-	if (DIRECTORY_SEPARATOR == '/' AND @ini_get("safe_mode") == FALSE)
+ */	
+	function is_really_writable($file)
 	{
-		return is_writable($file);
-	}
+		// If we're on a Unix server with safe_mode off we call is_writable
+		if (DIRECTORY_SEPARATOR == '/' AND @ini_get("safe_mode") == FALSE)
+		{
+			return is_writable($file);
+		}
 
-	// For windows servers and safe_mode "on" installations we'll actually
-	// write a file then read it.  Bah...
-	if (is_dir($file))
-	{
-		$file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100));
+		// For windows servers and safe_mode "on" installations we'll actually
+		// write a file then read it.  Bah...
+		if (is_dir($file))
+		{
+			$file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100));
 
-		if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
+			if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
+			{
+				return FALSE;
+			}
+
+			fclose($fp);
+			@chmod($file, DIR_WRITE_MODE);
+			@unlink($file);
+			return TRUE;
+		}
+		elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
 		{
 			return FALSE;
 		}
 
 		fclose($fp);
-		@chmod($file, DIR_WRITE_MODE);
-		@unlink($file);
 		return TRUE;
 	}
-	elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
-	{
-		return FALSE;
-	}
-
-	fclose($fp);
-	return TRUE;
-}
 
 // ------------------------------------------------------------------------
 
@@ -94,60 +108,66 @@
 *
 * @access	public
 * @param	string	the class name being requested
-* @param	bool	optional flag that lets classes get loaded but not instantiated
+* @param	string	the directory where the class should be found
+* @param	string	the class name prefix
 * @return	object
 */
-function &load_class($class, $instantiate = TRUE)
-{
-	static $objects = array();
-
-	// Does the class exist?  If so, we're done...
-	if (isset($objects[$class]))
+	function &load_class($class, $directory = 'libraries', $prefix = 'CI_')
 	{
-		return $objects[$class];
-	}
-
-	// If the requested class does not exist in the application/libraries
-	// folder we'll load the native class from the system/libraries folder.	
-	if (file_exists(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT))
-	{
-		require(BASEPATH.'libraries/'.$class.EXT);
-		require(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT);
-		$is_subclass = TRUE;
-	}
-	else
-	{
-		if (file_exists(APPPATH.'libraries/'.$class.EXT))
+		static $_classes = array();
+		
+		// Does the class exist?  If so, we're done...
+		if (isset($_classes[$class]))
 		{
-			require(APPPATH.'libraries/'.$class.EXT);
-			$is_subclass = FALSE;
+			return $_classes[$class];
 		}
-		else
+
+		$name = FALSE;
+
+		// Look for the class first in the native system/libraries folder
+		// thenin the local application/libraries folder
+		foreach (array(BASEPATH, APPPATH) as $path)
+		{ 
+			if (file_exists($path.$directory.'/'.$class.EXT))
+			{
+				$name = $prefix.$class;
+		
+				if (class_exists($name) === FALSE)
+				{
+					require($path.$directory.'/'.$class.EXT);
+				}
+		
+				break;
+			}
+		}
+
+		// Is the request a class extension?  If so we load it too
+		if (file_exists(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT))
+		{	
+			$name = config_item('subclass_prefix').$class;
+	
+			if (class_exists($name) === FALSE)
+			{
+				require(APPPATH.'libraries/'.config_item('subclass_prefix').$class.EXT);
+			}
+		}
+
+		// Did we find the class?
+		if ($name === FALSE)
 		{
-			require(BASEPATH.'libraries/'.$class.EXT);
-			$is_subclass = FALSE;
+			// Note: We use exit() rather then show_error() in order to avoid a 
+			// self-referencing loop with the Excptions class 
+			exit('Unable to locate the specified class: '.$class.EXT);
 		}
+
+		// Keep track of what we just loaded
+		is_loaded($class);
+
+		$_classes[$class] =& instantiate_class(new $name());
+		return $_classes[$class];
 	}
 
-	if ($instantiate == FALSE)
-	{
-		$objects[$class] = TRUE;
-		return $objects[$class];
-	}
-
-	if ($is_subclass == TRUE)
-	{
-		$name = config_item('subclass_prefix').$class;
-
-		$objects[$class] =& instantiate_class(new $name());
-		return $objects[$class];
-	}
-
-	$name = ($class != 'Controller') ? 'CI_'.$class : $class;
-
-	$objects[$class] =& instantiate_class(new $name());
-	return $objects[$class];
-}
+// ------------------------------------------------------------------------
 
 /**
  * Instantiate Class
@@ -161,64 +181,110 @@
  * @param	object
  * @return	object
  */
-function &instantiate_class(&$class_object)
-{
-	return $class_object;
-}
+	function &instantiate_class(&$class_object)
+	{
+		return $class_object;
+	}
+
+// --------------------------------------------------------------------
+
+/**
+* Keeps track of which libraries have been loaded.  This function is
+* called by the load_class() function above
+*
+* @access	public
+* @return	array
+*/
+	function is_loaded($class = '')
+	{
+		static $_is_loaded = array();
+
+		if ($class != '')
+		{
+			$_is_loaded[strtolower($class)] = $class;
+		}
+
+		return $_is_loaded;
+	}
+
+// ------------------------------------------------------------------------
 
 /**
 * Loads the main config.php file
 *
+* This function lets us grab the config file even if the Config class
+* hasn't been instantiated yet
+*
 * @access	private
 * @return	array
 */
-function &get_config()
-{
-	static $main_conf;
-
-	if ( ! isset($main_conf))
+	function &get_config($replace = array())
 	{
+		static $_config;
+	
+		if (isset($_config))
+		{
+			return $_config[0];
+		}	
+
+		// Fetch the config file
 		if ( ! file_exists(APPPATH.'config/config'.EXT))
 		{
-			exit('The configuration file config'.EXT.' does not exist.');
+			exit('The configuration file does not exist.');
+		}
+		else
+		{
+			require(APPPATH.'config/config'.EXT);
 		}
 
-		require(APPPATH.'config/config'.EXT);
-
+		// Does the $config array exist in the file?
 		if ( ! isset($config) OR ! is_array($config))
 		{
 			exit('Your config file does not appear to be formatted correctly.');
 		}
 
-		$main_conf[0] =& $config;
+		// Are any values being dynamically replaced?
+		if (count($replace) > 0)
+		{
+			foreach ($replace as $key => $val)
+			{
+				if (isset($config[$key]))
+				{
+					$config[$key] = $val;
+				}
+			}
+		}
+	
+		return $_config[0] =& $config;
 	}
-	return $main_conf[0];
-}
+
+// ------------------------------------------------------------------------
 
 /**
-* Gets a config item
+* Returns the specified config item
 *
 * @access	public
 * @return	mixed
 */
-function config_item($item)
-{
-	static $config_item = array();
-
-	if ( ! isset($config_item[$item]))
+	function config_item($item)
 	{
-		$config =& get_config();
-
-		if ( ! isset($config[$item]))
+		static $_config_item = array();
+	
+		if ( ! isset($_config_item[$item]))
 		{
-			return FALSE;
+			$config =& get_config();
+	
+			if ( ! isset($config[$item]))
+			{
+				return FALSE;
+			}
+			$_config_item[$item] = $config[$item];
 		}
-		$config_item[$item] = $config[$item];
+	
+		return $_config_item[$item];
 	}
 
-	return $config_item[$item];
-}
-
+// ------------------------------------------------------------------------
 
 /**
 * Error Handler
@@ -232,13 +298,14 @@
 * @access	public
 * @return	void
 */
-function show_error($message, $status_code = 500)
-{
-	$error =& load_class('Exceptions');
-	echo $error->show_error('An Error Was Encountered', $message, 'error_general', $status_code);
-	exit;
-}
+	function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')
+	{
+		$_error =& load_class('Exceptions', 'core');
+		echo $_error->show_error($heading, $message, 'error_general', $status_code);
+		exit;
+	}
 
+// ------------------------------------------------------------------------
 
 /**
 * 404 Page Handler
@@ -250,13 +317,14 @@
 * @access	public
 * @return	void
 */
-function show_404($page = '')
-{
-	$error =& load_class('Exceptions');
-	$error->show_404($page);
-	exit;
-}
+	function show_404($page = '')
+	{
+		$_error =& load_class('Exceptions', 'core');
+		$_error->show_404($page);
+		exit;
+	}
 
+// ------------------------------------------------------------------------
 
 /**
 * Error Logging Interface
@@ -267,20 +335,20 @@
 * @access	public
 * @return	void
 */
-function log_message($level = 'error', $message, $php_error = FALSE)
-{
-	static $LOG;
-	
-	$config =& get_config();
-	if ($config['log_threshold'] == 0)
+	function log_message($level = 'error', $message, $php_error = FALSE)
 	{
-		return;
+		static $_log;
+
+		if (config_item('log_threshold') == 0)
+		{
+			return;
+		}
+	
+		$_log =& load_class('Log');
+		$_log->write_log($level, $message, $php_error);
 	}
 
-	$LOG =& load_class('Log');
-	$LOG->write_log($level, $message, $php_error);
-}
-
+// ------------------------------------------------------------------------
 
 /**
  * Set HTTP Status Header
@@ -289,89 +357,90 @@
  * @param	int 	the status code
  * @param	string	
  * @return	void
- */
-function set_status_header($code = 200, $text = '')
-{
-	$stati = array(
-						200	=> 'OK',
-						201	=> 'Created',
-						202	=> 'Accepted',
-						203	=> 'Non-Authoritative Information',
-						204	=> 'No Content',
-						205	=> 'Reset Content',
-						206	=> 'Partial Content',
-
-						300	=> 'Multiple Choices',
-						301	=> 'Moved Permanently',
-						302	=> 'Found',
-						304	=> 'Not Modified',
-						305	=> 'Use Proxy',
-						307	=> 'Temporary Redirect',
-
-						400	=> 'Bad Request',
-						401	=> 'Unauthorized',
-						403	=> 'Forbidden',
-						404	=> 'Not Found',
-						405	=> 'Method Not Allowed',
-						406	=> 'Not Acceptable',
-						407	=> 'Proxy Authentication Required',
-						408	=> 'Request Timeout',
-						409	=> 'Conflict',
-						410	=> 'Gone',
-						411	=> 'Length Required',
-						412	=> 'Precondition Failed',
-						413	=> 'Request Entity Too Large',
-						414	=> 'Request-URI Too Long',
-						415	=> 'Unsupported Media Type',
-						416	=> 'Requested Range Not Satisfiable',
-						417	=> 'Expectation Failed',
-
-						500	=> 'Internal Server Error',
-						501	=> 'Not Implemented',
-						502	=> 'Bad Gateway',
-						503	=> 'Service Unavailable',
-						504	=> 'Gateway Timeout',
-						505	=> 'HTTP Version Not Supported'
-					);
-
-	if ($code == '' OR ! is_numeric($code))
+ */	
+	function set_status_header($code = 200, $text = '')
 	{
-		show_error('Status codes must be numeric', 500);
-	}
+		$stati = array(
+							200	=> 'OK',
+							201	=> 'Created',
+							202	=> 'Accepted',
+							203	=> 'Non-Authoritative Information',
+							204	=> 'No Content',
+							205	=> 'Reset Content',
+							206	=> 'Partial Content',
 
-	if (isset($stati[$code]) AND $text == '')
-	{				
-		$text = $stati[$code];
+							300	=> 'Multiple Choices',
+							301	=> 'Moved Permanently',
+							302	=> 'Found',
+							304	=> 'Not Modified',
+							305	=> 'Use Proxy',
+							307	=> 'Temporary Redirect',
+
+							400	=> 'Bad Request',
+							401	=> 'Unauthorized',
+							403	=> 'Forbidden',
+							404	=> 'Not Found',
+							405	=> 'Method Not Allowed',
+							406	=> 'Not Acceptable',
+							407	=> 'Proxy Authentication Required',
+							408	=> 'Request Timeout',
+							409	=> 'Conflict',
+							410	=> 'Gone',
+							411	=> 'Length Required',
+							412	=> 'Precondition Failed',
+							413	=> 'Request Entity Too Large',
+							414	=> 'Request-URI Too Long',
+							415	=> 'Unsupported Media Type',
+							416	=> 'Requested Range Not Satisfiable',
+							417	=> 'Expectation Failed',
+
+							500	=> 'Internal Server Error',
+							501	=> 'Not Implemented',
+							502	=> 'Bad Gateway',
+							503	=> 'Service Unavailable',
+							504	=> 'Gateway Timeout',
+							505	=> 'HTTP Version Not Supported'
+						);
+
+		if ($code == '' OR ! is_numeric($code))
+		{
+			show_error('Status codes must be numeric', 500);
+		}
+
+		if (isset($stati[$code]) AND $text == '')
+		{				
+			$text = $stati[$code];
+		}
+	
+		if ($text == '')
+		{
+			show_error('No status text available.  Please check your status code number or supply your own message text.', 500);
+		}
+	
+		$server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;
+
+		if (substr(php_sapi_name(), 0, 3) == 'cgi')
+		{
+			header("Status: {$code} {$text}", TRUE);
+		}
+		elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')
+		{
+			header($server_protocol." {$code} {$text}", TRUE, $code);
+		}
+		else
+		{
+			header("HTTP/1.1 {$code} {$text}", TRUE, $code);
+		}
 	}
 	
-	if ($text == '')
-	{
-		show_error('No status text available.  Please check your status code number or supply your own message text.', 500);
-	}
-	
-	$server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;
-
-	if (substr(php_sapi_name(), 0, 3) == 'cgi')
-	{
-		header("Status: {$code} {$text}", TRUE);
-	}
-	elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')
-	{
-		header($server_protocol." {$code} {$text}", TRUE, $code);
-	}
-	else
-	{
-		header("HTTP/1.1 {$code} {$text}", TRUE, $code);
-	}
-}
-
+// --------------------------------------------------------------------
 
 /**
 * Exception Handler
 *
 * This is the custom exception handler that is declaired at the top
-* of Codeigniter.php.  The main reason we use this is permit
-* PHP errors to be logged in our own log files since we may
+* of Codeigniter.php.  The main reason we use this is to permit
+* PHP errors to be logged in our own log files since the user may
 * not have access to server logs. Since this function
 * effectively intercepts PHP errors, however, we also need
 * to display errors based on the current error_reporting level.
@@ -380,40 +449,35 @@
 * @access	private
 * @return	void
 */
-function _exception_handler($severity, $message, $filepath, $line)
-{	
-	 // We don't bother with "strict" notices since they will fill up
-	 // the log file with information that isn't normally very
-	 // helpful.  For example, if you are running PHP 5 and you
-	 // use version 4 style class functions (without prefixes
-	 // like "public", "private", etc.) you'll get notices telling
-	 // you that these have been deprecated.
+	function _exception_handler($severity, $message, $filepath, $line)
+	{	
+		 // We don't bother with "strict" notices since they tend to fill up
+		 // the log file with excess information that isn't normally very helpful.
+		 // For example, if you are running PHP 5 and you use version 4 style 
+		 // class functions (without prefixes like "public", "private", etc.) 
+		 // you'll get notices telling you that these have been deprecated.
+		if ($severity == E_STRICT)
+		{
+			return;
+		}
 	
-	if ($severity == E_STRICT)
-	{
-		return;
-	}
-
-	$error =& load_class('Exceptions');
-
-	// Should we display the error?
-	// We'll get the current error_reporting level and add its bits
-	// with the severity bits to find out.
+		$_error =& load_class('Exceptions', 'core');
 	
-	if (($severity & error_reporting()) == $severity)
-	{
-		$error->show_php_error($severity, $message, $filepath, $line);
-	}
-	
-	// Should we log the error?  No?  We're done...
-	$config =& get_config();
-	if ($config['log_threshold'] == 0)
-	{
-		return;
-	}
+		// Should we display the error? We'll get the current error_reporting 
+		// level and add its bits with the severity bits to find out.
+		if (($severity & error_reporting()) == $severity)
+		{
+			$_error->show_php_error($severity, $message, $filepath, $line);
+		}
 
-	$error->log_exception($severity, $message, $filepath, $line);
-}
+		// Should we log the error?  No?  We're done...
+		if (config_item('log_threshold') == 0)
+		{
+			return;
+		}
+	
+		$_error->log_exception($severity, $message, $filepath, $line);
+	}
 
 
 
